/*
* Copyright (C) 2021 ~ 2022 Uniontech Technology Co., Ltd.
*
* Author:      zhangbingyi <zhangbingyi@uniontech.com>
*
* Maintainer:  zhangbingyi <zhangbingyi@uniontech.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

// USB连接记录 表格显示列
#define COLUMN_NAME 0
#define COLUMN_TIME 1
#define COLUMN_STRATEGY 2
#define COLUMN_OPERATION 3
#define COLUMN_DATA 4

// USB管控三种模式
#define USB_PERM_MODE_RW 0
#define USB_PERM_MODE_RO 1
#define USB_PERM_MODE_NO 2

// 数据存储偏移
#define DATA_ROLE_NAME Qt::UserRole + 1 // 数据存储偏移 - 名称
#define DATA_ROLE_TIME Qt::UserRole + 2 // 数据存储偏移 - 添加时间
#define DATA_ROLE_STRATEGY Qt::UserRole + 3 // 数据存储偏移 - 执行策略
#define DATA_ROLE_SERIAL Qt::UserRole + 4 // 数据存储偏移 - 序列号
#define DATA_ROLE_VENDOR_ID Qt::UserRole + 5 // 数据存储偏移 - 制造商id
#define DATA_ROLE_PRODUCT_ID Qt::UserRole + 6 // 数据存储偏移 - 生产商id
#define DATA_ROLE_OP_STATUS Qt::UserRole + 7 // 数据存储偏移 - 操作（添加/移除）白名单状态

// 白名单 操作类型
#define USB_MANAGER_OP_TYPE_ADD 0 // 添加
#define USB_MANAGER_OP_TYPE_REMOVE 1 // 删除
#define USB_MANAGER_OP_TYPE_MODIFY 2 // 修改

#define ICON_SIZE 16
